package com.joe.blockview.utils;


import android.content.res.Resources;

public class ScreenUtils {
    private ScreenUtils()
    {
        /* cannot be instantiated */
        throw new UnsupportedOperationException("cannot be instantiated");
    }

    public static float getPxFromDp(Resources resources,int dp){
        float scale = resources.getDisplayMetrics().density;
        return (int) (dp * scale + 0.5f);
    }


}
